﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WMM.Tapioca.Taxonomy;
using System.Collections;
using WMM.Tapioca.Linkbase;

namespace WMM.Tapioca.XbrlDimension
{
    /// <summary>
    /// This class represents an Hypercube as it is described by the Dimensions 1.0
    /// Specification
    /// </summary>
    public class Hypercube
    {
        private Concept concept; // the concept the hypercube refers to  

        /// <returns> Concept object representing this hypercube. </returns>
        public virtual Concept Concept
        {
            get
            {
                return concept;
            }
        }


        /// 
        /// <param name="concept">
        ///            The Concept object which represents the hypercube. </param>
        public Hypercube(Concept concept)
        {
            this.concept = concept;
        }

        ///// <summary>
        ///// This method tests for "equality" between two Hypercube objects. They are
        ///// equal if:<br/> - the concepts representing both Hypercubes are equal<br/> -
        ///// the set of Dimensions of both Hypercubes are equal<br/> - both
        ///// Hypercubes are defined in the same extended link role<br/>
        ///// </summary>
        ///// <returns> True if both Hypercube objects are equal, false otherwise.
        /////  </returns>
        //public virtual bool Equals(object obj)
        //{
        //    if (this == obj)
        //    {
        //        return true;
        //    }
        //    if (!(obj is Hypercube))
        //    {
        //        return false;
        //    }
        //    Hypercube otherCube = (Hypercube)obj;
        //    return concept.Equals(otherCube.Concept) && dimensionSet.Equals(otherCube.DimensionSet) && (extendedLinkRole == null ? otherCube.ExtendedLinkRole == null : extendedLinkRole.Equals(otherCube.ExtendedLinkRole));
        //}

        ///// <returns> A hash code of this object. </returns>
        //public virtual int GetHashCode()
        //{
        //    int hash = 1;
        //    hash = hash * 31 + concept.GetHashCode();
        //    hash = hash * 31 + dimensionSet.GetHashCode();
        //    hash = hash * 31 + (extendedLinkRole != null ? extendedLinkRole.GetHashCode() : 0);
        //    return hash;
        //}
    }
}
